<template>
  <div class="meeting-achievement">
    <div class="chart" id="meetingAchievementPie"></div>
  </div>
</template>
<script>
import * as echarts from 'echarts'
export default {
  name: 'MeetingAchievement',
  methods:{
    initChart(){
      const chart=echarts.init(document.getElementById('meetingAchievementPie'))
      const option={
        color:['#00C6FF','#0082FF','#0058FF','#89CAFF'],
        tooltip: {
          trigger: 'item'
        },
        series: [
          {
            name: '成果占比',
            type: 'pie',
            radius: ['40%', '70%'],
            label: {
              show: true,
              color: '#32B4FF',
              formatter: '{b}: {d}%'
            },
            labelLine: {
              show: true
            },
            data: [
              {name:'法律知识问卷',value:40},
              {name:'反诈宣传',value:35},
              {name:'其他活动',value:25},
            ]
          }
        ]
      }
      chart.setOption(option)
    }
  },
  mounted() {
    this.initChart()
  }
}
</script>
<style scoped lang="scss">
.meeting-achievement{
  width: 100%;
  height: 100%;
  .chart{
    width: 100%;
    height: 100%;
  }
}
</style>
